<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/admin/top.jsp" %>
 <script type="text/javascript">
    	$(function(){
			//弹出新窗口的初始化，同时进行新窗口里树的初始化---zhanghao
			$("#w").window({
				onClose:function(){
					$('#txtNewPass').val('');
					$('#txtRePass').val('');
				}
			});
		});
    	 $(function() {
    		 InitLeftMenu();
             openPwd();
             tabClose();
             tabCloseEven();
             $('#editpass').click(function() {
                 $('#w').window('open');
             });

             $('#btnEp').click(function() {
                 serverLogin();
             })
 			$('#btnCancel').click(function(){closePwd();})
            $('#loginOut').click(function() {
                 $.messager.confirm('系统提示', '您确定要退出本次登录吗?', function(r) {
                     if (r) {
                         location.href = '${ctx}/system/user/TsysUser/exit.do';
                     }
                 });

             })
         });
        //设置登录窗口
        function openPwd() {
             
        }
        //关闭登录窗口
        function closePwd() {
            $('#w').window('close');
        }
        
	$(function(){
		//树形控件功能
		$('#tt').tree({
			checkbox: false,
			url: '${ctx}/system/SysFunction/rightTreeAjax.do',
			onClick:function(node){
					var url = node.attributes['url'];
					addTabs(node.text,"${ctx}"+url)
					$(this).tree('toggle', 'mainPanle');
			}			
		});
	});
	
	function addTabs(title, url){
	   
    if ($('#tabs').tabs('exists', title)){
     
        $('#tabs').tabs('select', title);
    } else { 
        var content ='<iframe scrolling="auto" frameborder="0" src="'+url+'" style="width:100%;height:100%;"></iframe>';
        $('#tabs').tabs('add',{
            title:title,
            content:content,
            closable:true
        });
    }
   }
	
</script>
<body class="easyui-layout" style="overflow-y: hidden"  scroll="no">
 <div region="south" split="true" border="true" style="height: 30px; background: #D2E0F2; ">
    <div class="footer">有好友</div>
    </div>
    <div region="west" split="true" title="导航菜单" style="width:180px;" id="west">
    		<div id="tt"></div>
  	<div class="easyui-accordion" fit="true" border="false"> 
			 
	</div>
	</div>
    <div id="mainPanle" region="center" style="background: #eee; overflow-y:hidden">
        <div id="tabs" class="easyui-tabs"  fit="true" border="false" >
            <div title="Home" style="padding:20px;overflow:hidden;" id="home">
    		</div>
			 
		</div>
    </div>
    
    
    

	<div id="mm" class="easyui-menu" style="width:150px;">
		<div id="mm-tabclose">关闭</div>
		<div id="mm-tabcloseall">全部关闭</div>
		<div id="mm-tabcloseother">除此之外全部关闭</div>
		<div class="menu-sep"></div>
		<div id="mm-tabcloseright">当前页右侧全部关闭</div>
		<div id="mm-tabcloseleft">当前页左侧全部关闭</div>
		<div class="menu-sep"></div>
		<div id="mm-exit">退出</div>
	</div>
</body>
</html>
